Default variables

System Variables - Default protocol allows to create Tags that point to HMI system variables regarding:

 

Protocol Editor Settings

From PLC Model list of Protocol Editor dialog, select Default.

 

Tag Editor Settings

Path: ProjectView> Config > double-click Tags

  1. To add a tag, click +: a new line is added.
  2. Select System Variables from the Driver list: tag definition dialog is displayed.

Element Description

Memory Type

Represents the system variable to which the Tag refers to. 

The below section shows the full list of possible system variables, grouped by category.

Alarms Variables
Variable Name Description Data Type
Alarm not acknowledged

True when alarms unacknowledged is pending

(Not Triggered Not Acknowledged<>0) OR (Triggered Not Acknowledged<>0)

boolean

read only

Alarm triggered

True when at least one alarm is triggered

(Triggered Acknowledged<>0) OR (Triggered <>0) OR (Triggered Not Acknowledged<>0)

boolean

read only

Number of missed alarm events Alarms exceeding the event queue. Queue length is defined in the engineconfig.xml file.

int

read only

Number of not triggered acknowledged Alarm condition no longer active; alarms already acknowledged

int

read only

Number of not triggered not acknowledged Alarm condition no longer active; awaiting acknowledgment

int

read only

Number of triggered acknowledged Alarm condition active; alarms already acknowledged

int

read only

Number of triggered alarms Alarm active: acknowledgment not required

int

read only

Number of triggered not acknowledged Alarm condition active; awaiting acknowledgment

int

read only

Buzzer Variables
Variable Name Description Data Type
Buzzer Setup

0 = disabled

1 = enabled (buzzer sounds as audible on any touchscreen event)

2 = buzzer status controlled by Buzzer Control system variable or by Buzzer on Touch property inside the "Project properties" of main manual

 

Buzzer on touchscreen (Setup=1) is not available on Linux platforms. See "Buzzer on Touch" property in alternative.

int

Buzzer Control

0 = buzzer off

1 = buzzer on

2 = buzzer blink

int

Buzzer Off Time Duration in milliseconds of off time when blink has been selected. Default = 1000. Range: 100–5000

int

Buzzer On Time Duration in milliseconds of on time when blink has been selected. Default = 1000. Range: 100–5000

int

Communication Variables
Variable Name Description Data Type
Protocol Communication Status

Summarize the status of the communication protocols.

0 = No protocol running, protocol drivers might not have been properly downloaded to the HMI device

1 = Protocols loaded and started, no communication error

2 = At least one communication protocol is reporting an error

int

read only

Protocol Error Message

Communication error with error source.

For example: "[xxxx]" where "xxxx" is the protocol abbreviation, the error source.

Multiple acronyms appear in case of multiple error sources. Blank when no errors are reported.

string

read only

Protocol Error Count Number of communication errors occurred since last reset. Reset value with Reset Protocol Error Count action, see "System actions" of main manual

int

read only

Database Variables
Variable Name Description Data Type
Database link error message

Last detected error description

string

read only

Database link status

0 = Undefined (not yet initialized)

1 = OnLine (ready)

2 = OffLine (not available)

3 = Transfer in progress

4 = Error

int

read only

Database link error count Errors counter. Increased after each error

int

read only

Each database variable is an array where index select the database link connection (Range 1-10)
Variables are updated only when any database connector action is executed

Daylight Saving Time Variables
Variable Name Description Data Type
Standard Offset Offset in minutes when standard time is set, with respect to GMT (for example: -8x60 = -480 minutes)

int

read only

Standard Week Week in which the standard time starts (for example: First = 1)

int

read only

Standard Month Month in which the standard time starts. Range: 0–11. (for example: November = 10)

int

read only

Standard Day Day of week in which the standard time starts (for example: Sunday = 0)

int

read only

Standard Hour Hour in which the standard time starts (for example: 02 = 2)

int

read only

Standard Minute Minute in which the standard time starts (for example: 00 = 0)

int

read only

DST Offset Offset in minutes when DLS time is set, with respect to GMT

int

read only

DST Week Week in which the DLS time starts

int

read only

DST Month Month in which the DLS time starts. Range: 0–11

int

read only

DST Day Day of week in which the DLS time starts

int

read only

DST Hour Hour in which the DLS time starts

int

read only

DST Minute Minute in which the DLS time starts

int

read only

All variables are read only: they cannot be used to update the system clock.

Device Variables
Variable Name Description Data Type
Available System Memory Free available RAM memory in bytes

uint64

read only

Backlight Time Activation time in hours of the display backlight since production of the device

unsignedInt

read only

Battery LED

Enables/disables the low battery LED indicator (when available)

0 = disabled

1 = enabled

Not available on Linux platforms (find the platform of your device at "HMI devices capabilities")

int

Display Brightness

Returns and adjusts brightness level.

When set to a low light level (0..3), the backlight stays lit to a higher level for 8 seconds to allow the user to make the adjustments and then is switched-off.

Even when set to 0, the backlight is still on and the Backlight Time counter increases. Range: 0–255

int

External Timeout

Non-operational time after which the display backlight is automatically turned off. The backlight is automatically turned on when the user touches the screen

-1 =

Switch off backlight and disable touch (switch display off). Backlight Time counter is stopped.

requires BSP v1.0.324 or higher.

-2 =

Switch off backlight but not disable touch. If touch is pressed, event is not passed to applications but screen saver exit and backlight return on.

Requires BSP v1.0.324 or higher.

0 = Switch backlight on (switch display on)
1..n =

Timeout, in seconds, for switch off backlight (screen saver timer)

The timeout value is rounded to multiples of one minute (60, 120, 180, etc,).

Find the platform of your device at "HMI devices capabilities"

int

Flash Free Space Free space left in internal Flash memory

uint64

read only

Manufacturer Code Code number that identifies the HMI

short

read only

Server RAM Usage Current RAM memory used from HMI, expressed in byte

uint64

read only

System Font List List of system fonts

string

read only

System Mode

Runtime operation status

1 = booting

2 = configuration mode

3 = operating mode

4 = restart

5 = shutdown

int

System UpTime Time the system has been powered since production of the unit (hours)

unsignedInt

read only

Dump information Variables
Variable Name Description Data Type
Dump Error Message Return error message if any error occurs during the dump operation

string

read only

Dump Archive Status

0 = initial default state
1 = operation triggered
2 = operation complete successfully
3 = operation completed with errors

int

read only

Dump Recipe Status

0 = initial default state
1 = operation triggered
2 = operation complete successfully
3 = operation completed with errors

int

read only

Dump Trend Status

0 = initial default state
1 = operation triggered
2 = operation complete successfully
3 = operation completed with errors

int

read only

Reset Recipe Status

0 = initial default state
1 = operation triggered
2 = operation complete successfully
3 = operation completed with errors

int

read only

Restore Recipe Status

0 = initial default state
1 = operation triggered
2 = operation complete successfully
3 = operation completed with errors

int

read only

Network Variables
Variable Name Description Data Type
Gateway

Gateway address of the main Ethernet interface of HMI

string

read only

IP Address

IP address of the main Ethernet interface of HMI

string

read only

Mac ID MAC ID of the main Ethernet interface of HMI

string

read only

Network Adapter Parameters JSON string that can be use to read or update the network adapters parameters

string

Network Status

Contains the result of the last operation required by writing inside the Adapter Parameters. It is updated after each write operation.

  • Empty string is meaning no errors
  • Last error descriptions

string

read only

Subnet Mask Subnet Mask of the main Ethernet interface of HMI

string

read only

PLC Variables
Variable Name Description Data Type
Get CopyCodesysProject Action Status

Provides status of CopyCodesysProject action.

0 = Action not called

1 = Action in progress

2 = Action completed

3 = Action aborted (CHK file missing)

4 = Action aborted (PRJ file missing)

5 = Action aborted (SDB file missing)

6 = Action aborted (multiple CHK files found)

7 = Action aborted (multiple PRJ files found)

8 = Action aborted (multiple SDB files found)

9 = Action aborted (inconsistent file names)

10 = Action aborted (unable to make directory)

11 = Action aborted (copy failed)

12 = Action aborted (Codesys module not present)

int

read only

PLC Status

Provides status of internal PLC.

0 = Run mode

1 = Stop mode

2 = Reload from file

3 = Reset Warm

4 = Reset Cold

5 = Reset Hard

int

PLC system variables refers to CODESYS V2 internal PLC

Screen Variables
Variable Name Description Data Type
X Screen resolution Display horizontal screen size in pixel

int

read only

Y Screen resolution

Display vertical screen size in pixel

int

read only

SD Card Variables
Variable Name Description Data Type
SD Card FreeSpace

Available space on card in bytes

uint64

read only

SD Card Name Name of SD card

string

read only

SD Card Size Size in bytes of the card plugged in the slot

uint64

read only

SD Card Status

0 = SD card unplugged

1 = SD card plugged

int

read only

Server Variables
Variable Name Description Data Type
Page name Name of current page

string

read only

Project Name Name of current project

string

read only

Project load time Date when the project was loaded on the JMobile HMI Runtime as in System Date format (milliseconds)

uint64

read only

Last operating mode start time

Seconds elapsed since device started operating mode

uint64

read only

All variables refer to server, not to HMI Client.

Time Variables
Variable Name Description Data Type
Day Of Month Range: 1–31

int

Day Of Week

Range: 0 = Sunday, .. , 6 = Saturday

int

Hour Range: 0–23

int

Minute Range: 0–59

int

Month

Range: 1–12

int

Second

Range: 0–59

int

System Time The same as UTC time. It can also be set as date/time for this variable unsignedInt
Year Current Year int

System time expressed in UTC format

USB Drive Variables
Variable Name Description Data Type
USB Drive FreeSpace Available space in bytes

uint64

read only

USB Drive Name

Name of USB device

string

read only

USB Drive Size Size in bytes of the device plugged in the USB port

uint64

read only

USB Drive Status

0 = USB Drive unplugged

1 = USB Drive plugged

int

read only

Version Variables
Variable Name Description Data Type
Main OS version Version of Main OS

string

read only

Runtime version

Version of Runtime

string

read only

Project name Project name

string

read only

Project version Project version

string

 

Project GUID Project GUID (unique identifier)

string

read only

Virtual Com Switch Variables
Variable Name Description Data Type
VCS status

Provides status of VCS service.

0 = Service enabled

1 = Client connected in interleaved mode

2 = Client connected in exclusive mode

3 = Service disabled (default)

unsignedByte

read only

VCS disable

Provides manual override of VCS service.

0 = VCS service enabled

1 = VCS service disabled (default)

boolean

VCS port Provides current listening TCP port on HMI by VCS service unsignedShort

 

Data Type

Each system variable has a specific data type, described in above tables.

The following table shows the details of any data type used for system variables.

Data Type Memory Space Limits
short 16-bit data -32768 ... 32767
int 32-bit data -2.1e9 ... 2.1e9
unsignedByte 8-bit data 0 ... 255
unsignedShort 16-bit data 0 ... 65535
unsignedInt 32-bit data 0 ... 4.2e9
uint64 64-bit data 0 ... 1.8e19
string Array of elements containing character code defined by selected encoding

Arraysize

In case of string Tag, this property represents the maximum number of bytes available in the string Tag.

Note: number of bytes corresponds to number of string chars if Encoding property is set to UTF-8 or Latin1 in Tag Editor.
If Encoding property is set to UCS-2BE, UCS-2LE, UTF-16BE or UTF-16LE one char requires 2 bytes.

Conversion

Conversion to be applied to the tag.

Depending on data type selected, the list Allowed shows one or more conversion types.

Value Description
Inv bits

inv: Invert all the bits of the tag.

Example:
1001 → 0110 (in binary format)
9 → 6 (in decimal format)

Negate

neg: Set the opposite of tag value.

Example:
25.36 → -25.36

AB -> BA

swapnibbles: Swap nibbles in a byte.

Example:
15D4 → 514D (in hexadecimal format)
5588 → 20813 (in decimal format)

ABCD -> CDAB

swap2: Swap bytes in a word.

Example:
9ACC → CC9A (in hexadecimal format)
39628 → 52378 (in decimal format)

ABCDEFGH -> GHEFCDAB

swap4: Swap bytes in a double word.

Example:
32FCFF54 → 54FFFC32 (in hexadecimal format)
855441236 → 1426062386 (in decimal format)

ABC...NOP -> OPM...DAB

swap8: Swap bytes in a long word.

Example:
142.366 → -893553517.588905 (in decimal format)
0 10000000110 0001110010111011011001000101101000011100101011000001

1 10000011100 1010101000010100010110110110110010110110000100111101
(in binary format)

BCD

bcd: Separate byte in two nibbles, read them as decimal (from 0 to 9)

Example:
23 → 17 (in decimal format)
0001 0111 = 23
0001 = 1 (first nibble)
0111 = 7 (second nibble)

Select conversion and click +. The selected item will be added to list Configured.

If more conversions are configured, they will be applied in order (from top to bottom of list Configured).

Use the arrow buttons to order the configured conversions.